#!/usr/bin/env bash

DIR=$(cd "$(dirname "$0")"; pwd)
set -ex
cd $DIR

. .direnv/bin/pid.sh

if [ ! -n "$1" ] ;then
exe=src/main.coffee
else
exe=${@:1}
fi

exec npx nodemon --watch 'src/**/*' -e coffee,js,mjs,json,wasm,txt,yaml --exec ".direnv/bin/coffee $exe"
